package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PAGO_SOLICITUD database table.
 * 
 */
@Entity
@Table(name="PAGO_SOLICITUD")
public class PagoSolicitud implements Serializable {
	private static final long serialVersionUID = 1L;
	private long pagoSolicitudId;
	private BigDecimal monto;
	private String tpoPago;
	private Date tsCrea;
	private Date tsModi;
	private String usrCrea;
	private String usrModi;
	private Abono abono;
	private Solicitud solicitud;

    public PagoSolicitud() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PAGO_SOLICITUD_ID", unique=true, nullable=false)
	public long getPagoSolicitudId() {
		return this.pagoSolicitudId;
	}

	public void setPagoSolicitudId(long pagoSolicitudId) {
		this.pagoSolicitudId = pagoSolicitudId;
	}


	@Column(nullable=false, precision=12, scale=2)
	public BigDecimal getMonto() {
		return this.monto;
	}

	public void setMonto(BigDecimal monto) {
		this.monto = monto;
	}


	@Column(name="TPO_PAGO", nullable=false, length=1)
	public String getTpoPago() {
		return this.tpoPago;
	}

	public void setTpoPago(String tpoPago) {
		this.tpoPago = tpoPago;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA")
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_MODI")
	public Date getTsModi() {
		return this.tsModi;
	}

	public void setTsModi(Date tsModi) {
		this.tsModi = tsModi;
	}


	@Column(name="USR_CREA", length=15)
	public String getUsrCrea() {
		return this.usrCrea;
	}

	public void setUsrCrea(String usrCrea) {
		this.usrCrea = usrCrea;
	}


	@Column(name="USR_MODI", length=15)
	public String getUsrModi() {
		return this.usrModi;
	}

	public void setUsrModi(String usrModi) {
		this.usrModi = usrModi;
	}


	//bi-directional many-to-one association to Abono
    @ManyToOne
	@JoinColumn(name="ABONO_ID")
	public Abono getAbono() {
		return this.abono;
	}

	public void setAbono(Abono abono) {
		this.abono = abono;
	}
	

	//bi-directional many-to-one association to Solicitud
    @ManyToOne
	@JoinColumn(name="SOLICITUD_ID", nullable=false)
	public Solicitud getSolicitud() {
		return this.solicitud;
	}

	public void setSolicitud(Solicitud solicitud) {
		this.solicitud = solicitud;
	}
	
}